/*
 * @Author: ray ray.chin@163.com
 * @Date: 2024-06-14 10:00:20
 * @LastEditors: ray ray.chin@163.com
 * @LastEditTime: 2024-06-14 11:40:18
 * @FilePath: /app-template-uni-upgrade/src/utils/logger.js
 * @Description: logger调试工具
 * Copyright (c) 2024 by ray, All Rights Reserved.
 */
import VConsole from "vconsole";
export const logger = {
    data() {
        return {
            allWaysShowLog: false,
        }
    },
    mounted() {
        if (this.allWaysShowLog) {
            const vConsole = new VConsole();
        }
    },
    methods: {
        // 闭包实现内部变量缓存
        openLog: (() => {
            let debugCount = 1;
            return function() {
                debugCount++;
                if (debugCount > 5) {
                    const vConsole = new VConsole();
                }
                console.log(debugCount);
            };
        })(),
    }
}